package cn.neo.hhrpc.provider;

import cn.neo.hhrpc.core.annotation.HHProvider;
import cn.neo.hhrpc.api.Order;
import cn.neo.hhrpc.api.OrderService;
import org.springframework.stereotype.Component;

@Component
@HHProvider
public class OrderServiceImpl implements OrderService {

    @Override
    public Order findById(Integer id) {

        if(404 == id) {
            throw new RuntimeException("404 exception");
        }

        return new Order(id.longValue(), 15.2f);
    }
}
